package com.quest.space.poker.base.enums;

public enum PokerValueEnum {
    /*"3", "4", "5", "6", "7", "8", "9", "10",
            "J", "Q", "K", "A", "2"*/
    THREE("3", 3),
    FOUR("4", 4),
    FIVE("5", 5),
    SIX("6", 6),
    SEVEN("7", 7),
    EIGHT("8", 8),
    NINE("9", 9),
    TEN("X", 10),
    J("J", 11),
    Q("Q", 12),
    K("K", 13),
    A("A", 14),
    TWO("2", 15),
    SMALL("w", 16),
    BIG("W", 17);


    private final String name;
    private final Integer value;

    PokerValueEnum(String name, Integer value) {
        this.value = value;
        this.name = name;
    }

    public static Integer getValueByName(String name) {
        for (PokerValueEnum value : PokerValueEnum.values()) {
            if (value.getName().equals(name)) {
                return value.getValue();
            }
        }
        return 0;
    }

    public String getName() {
        return name;
    }

    public Integer getValue() {
        return value;
    }
}
